<div id="recipe-edit-form">
<p><?php echo $html->link("Trang Chủ »", "/recipes"); ?> <?php echo $html->link("Món Ăn »", "/recipes/show_all"); ?> Tôi biết nấu »</p>
<h1>Sửa món ăn</h1>
<fieldset>
<legend>Món...</legend>
<!-- <?php echo $ajax->form(array('type' => 'post', 'options' => array( 'model'=>'Recipe', 'update'=>'recipe-edit-form', 'url' => array("controller" => "recipes", "action" => "edit/".$recipe_permalink))));?> -->
<?php echo $form->create("Recipe", array("url" => "/recipes/edit/".$recipe_permalink, "type" => "file")); ?>
<ul>
<li>
  <div class="group">
  <div>
  <?php echo $form->input("Recipe.name", array("class" => "text large", "label" => array("class" => "desc", "text" => "Tên món ăn <span class=\"req\">*</span>"), "error" => array("wrap" => "p", "class" => "error"))); ?>
  <?php echo $form->input("Recipe.category_id", array("type" => "select", "class" => "select medium", "label" => array("class" => "desc", "text" => "Loại <span class=\"req\">*</span>"), "error" => array("wrap" => "p", "class" => "error"))); ?>
  <?php echo $form->input("Recipe.ingredients", array("class" => "textarea medium", "label" => array("class" => "desc", "text" => "Nguyên liệu <span class=\"req\">*</span>"), "error" => array("wrap" => "p", "class" => "error"))); ?>
  <?php echo $ckEditor->load('Recipe.ingredients'); ?>
  <?php echo $form->input("Recipe.preparation", array("class" => "textarea medium", "label" => array("class" => "desc", "text" => "Chuẩn bị <span class=\"req\">*</span>"), "error" => array("wrap" => "p", "class" => "error"))); ?>
  <?php echo $form->input("Recipe.directions", array("class" => "textarea medium", "label" => array("class" => "desc", "text" => "Chế biến <span class=\"req\">*</span>"), "error" => array("wrap" => "p", "class" => "error"))); ?>
  <?php echo $form->input("Recipe.serve", array("class" => "textarea medium", "label" => array("class" => "desc", "text" => "Trình bày / Cách dùng"), "error" => array("wrap" => "p", "class" => "error"))); ?>
  <?php echo $form->input("Recipe.image", array("type" => "file", "class" => "file large", "label" => array("class" => "desc", "text" => "Hình minh họa"), "error" => array("wrap" => "p", "class" => "error"))); ?>
  <?php if ($session->read("Account.level") > 0) { echo $form->input("Recipe.approved", array("options" => array("0" => "Không", "1" => "Có"), "type" => "select", "class" => "select medium", "label" => array("class" => "desc", "text" => "Cho hiển thị trong danh sách món ăn"), "error" => array("wrap" => "p", "class" => "error"))); } ?>
  <label class="desc"></label>
  <?php echo $form->button("Gửi", array("class" => "button", "type" => "submit", "style" => "width:100px;")); ?>
  </div>
  </div>
</li>
</ul>
<?php echo $form->end(); ?>
</fieldset>
</div>